#ifndef QTBOARD_H
#define QTBOARD_H

#include "QtSprite.h"
#include "Board.h"
#include "QtTileManager.h"

class QtBoard: public QtSprite, public Board
{
public:
	QtBoard();
	~QtBoard();

	virtual void Resize(unsigned int width, unsigned int height);

	void SetTileManager(QtTileManager* manager);

protected:
	virtual Cell* CreateCell(unsigned int cellX, unsigned int cellY);

	virtual QRectF boundingRect() const;
	virtual QPainterPath shape() const;
	virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

private:
	QPainterPath shapepath;
	QRect bounds;

	QtTileManager *tileManager;

	static const unsigned int CELLSIZE = 64;
};

#endif //QTBOARD_H